import request from '@/utils/request'

// 查询采购列表
export function listCaigouMain(query) {
  return request({
    url: '/business/caigouMain/list',
    method: 'get',
    params: query
  })
}

// 查询采购详细
export function getCaigouMain(id) {
  return request({
    url: '/business/caigouMain/' + id,
    method: 'get'
  })
}

// 新增采购
export function addCaigouMain(data) {
  return request({
    url: '/business/caigouMain',
    method: 'post',
    data: data
  })
}

// 修改采购
export function updateCaigouMain(data) {
  return request({
    url: '/business/caigouMain',
    method: 'put',
    data: data
  })
}
// 修改采购
export function updateCaigouMainState(data) {
  return request({
    url: '/business/caigouMain/updateCaigouMainState',
    method: 'put',
    data: data
  })
}
// 删除采购
export function delCaigouMain(danhao) {
  return request({
    url: '/business/caigouMain/' + danhao,
    method: 'delete'
  })
}
